package day06;
import java.util.Scanner;
public class MethodDemo {
    public static void main(String[] args) {
                        speak();
                        speak();
        System.out.println("哎呦，你干嘛");
        ufo("坤坤",20);
        boolean a=ufo1();
        System.out.println(a);
        int c=(int) (Math.random()*100+1);
        int b=(int) (Math.random()*100+1);
        int d=ufo2(b,c);
        System.out.println(d);
        int []o=ufo3(3,500);
        for (int i=0;i<o.length;i++){
            System.out.println(o[i]);
        }
    }
    public static void speak(){
        System.out.println("坤坤");
    }
    public static void ufo(String name,int age){
        if (age<=18){
            return;
        }
        System.out.println("大家好，我叫"+name+"今年"+age+"岁了");
    }
    public static boolean ufo1(){
        return true;
    }
    public static int ufo2(int num1,int num2){
       int num=num1+num2;
       return num;
    }
    public static int[] ufo3(int t,int x){
        int []a=new int[t];
        for (int i=1;i< a.length;i++){
            a[i]=(int) (Math.random()*x);
        }
        return a;
    }

}
